/*
 * @Author: your name
 * @Date: 2021-02-01 22:02:58
 * @LastEditTime: 2021-02-01 22:47:17
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \鲜花项目\js\detailPage.js
 */
$(function() {
    // 移动端轮播组件
    var mySwiper = new Swiper('.swiper-container', {
        loop: true, // 循环模式选项
        autoplay: true, //可选选项，自动滑动
        // 如果需要分页器
        pagination: {
            el: '.swiper-pagination',
        },
    })

    // 地区三级联动
    // 点击所在地区
    $('#selectArea').on('click', function() {
        // 地址三级联动
        weui.picker(cityData3, {
            defaultValue: ["110000", "110100", "110101"],
            onConfirm: function(result) {
                var str = "";
                var cityArr = [];
                result.map(function(i, val) {
                    str += i["label"] + ' ';
                    cityArr.push(i["value"]);
                });
                $("#selectArea").val(str);
                $("#selectArea").attr("cityArr", cityArr);
            }
        })
    });
})